package messages;


/**
 * AccountEditMessage
 * 
 * Message sent by an admin to edit an existing account or by an
 * existing user to change his own password.
 */
public class AccountEditMessage extends Message {
	
	
	public AccountEditMessage(String login, String newPassword) {
		this(login, newPassword, null);
	}
	

	public AccountEditMessage(String login, String newPassword, String newRole) {
		super();
		this.login = login;
		this.newPassword = newPassword;
		this.newRole = newRole;
	}


	public String getLogin() {
		return login;
	}
		
	
	public String getNewPassword() {
		return newPassword;
	}


	public String getNewRole() {
		return newRole;
	}
	
	
	public String getSenderLogin() {
		return senderLogin;
	}
	
	
	public void setSenderLogin(String senderLogin) {
		this.senderLogin = senderLogin;
	}


	@Override
	public String toString() {
		return super.toString() + "(login=" + this.login + ")";
	}
	

	private String login;
	private String newPassword;
	private String newRole;
	private String senderLogin = null;	// Who did the request?

	private static final long serialVersionUID = 1L;
}
